package com.yoyosys.db.partition.vo;

import com.alibaba.fastjson.JSON;

import java.util.List;

/**
 * 分区信息结果
 */
public class PartitionInfo {
        /**
         * schema名称
         */
        private String schemaName;
        /**
         * 表名称
         */
        private String tableName;
        /**
         * 分区类型
         */
        private String partitionType;
        /**
         * 分区key
         */
        private String partitionKey;

        /**
         * 分区详细信息
         */
        private List<Partition> partitions;


        public String getSchemaName() {
                return schemaName;
        }

        public void setSchemaName(String schemaName) {
                this.schemaName = schemaName;
        }

        public String getTableName() {
                return tableName;
        }

        public void setTableName(String tableName) {
                this.tableName = tableName;
        }

        public String getPartitionType() {
                return partitionType;
        }

        public void setPartitionType(String partitionType) {
                this.partitionType = partitionType;
        }

        public String getPartitionKey() {
                return partitionKey;
        }

        public void setPartitionKey(String partitionKey) {
                this.partitionKey = partitionKey;
        }

        public List<Partition> getPartitions() {
                return partitions;
        }

        public void setPartitions(List<Partition> partitions) {
                this.partitions = partitions;
        }

        public String toJson(){
                return JSON.toJSONString(this);
        }
}